import '../model/language.dart';
import 'public_text.dart';

/// FileName public_language
///
/// @Author lax
/// @Date 2024/5/31
///
/// @Description

class PublicLanguage {
  static set language(Language language) {
    _language = language;
    PublicText.update(language: language);
  }

  static Language get language {
    return _language;
  }

  static Language _language = defaultLanguage;

  static Language defaultLanguage = Language.values.first;

  static var languageLocalCodeList = ['zh', 'en', 'ko', 'vi', 'hi'];

  static String get languageLocalCode {
    return languageLocalCodeList[language.index];
  }
}
